home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / mus / misc / RaveScope.lha / RaveScope / Developer / Include / monoscope.i < prev    next >
Encoding:
Text File  |  1998-09-22  |  4.4 KB  |  135 lines

  1.  
  2. ;Any changes made to this include-file, must also be made in its corresponding
  3. ;c header-file, monoscope.h
  4.  
  5.         IFND    MONOSCOPE
  6. MONOSCOPE:    SET    1
  7.  
  8. ***************************************************************************************************
  9.         STRUCTURE    Monoscope,0            ;MONOSCOPE STRUCTURE
  10.                STRUCT    msa_oStep,11*2*2        ;25 - 900 % settings
  11.          APTR    msa_oLineData;            ;Ptr to precalced data
  12.          APTR    msa_oVolListX;            ;1/2:Trad vol list x
  13.          APTR    msa_oVolListY;            ;2/2:Trad vol list y
  14.          APTR    msa_oVolList;            ;Wrapped vol list
  15.          APTR    msa_oVolListXUS;        ;1/2:Trad unsigned vol list x
  16.          APTR    msa_oVolListYUS;        ;2/2:Trad unsigned vol list y
  17.          APTR    msa_oVolListUS;            ;Wrapped unsigned vol list
  18.         UWORD    msa_oWidth;            ;1/3:Actual width (pixels)
  19.         UWORD    msa_oHeight;            ;2/3:Actual height (lines)
  20.         UWORD    msa_oPPR;            ;3/3:Pixels per row(in memory)
  21.         UWORD    msa_oDispX;            ;1/2:Display size x  (radius!)
  22.         UWORD    msa_oDispY;            ;2/2:Display size y  (radius!)
  23.         UWORD    msa_oStore;            ;#of pos/angle to store (rad!)
  24.         UWORD    msa_oCalcS;            ;Calc size x/y(greatest)(rad!)
  25.         UWORD    msa_oCalcM;            ;Closest gr8r 2^n 2calc (rad!)
  26.         UWORD    msa_oCircumF;            ;Sum of all borders
  27.             UWORD    msa_oCtr;            ;Counter-word...
  28.             UBYTE   msa_oFlags;            ;See below for flags
  29.             UBYTE   msa_oSHFlags;            ;Copy of ScopeHeader flags
  30.         LABEL    Scope_SIZEOF;
  31.                             ;Flags to pass to msa_InitData...
  32.         BITDEF    MSCP,ALLMODES,0            ;0=just wrapped, 1=also trad & alt
  33.         BITDEF    MSCP,NOUNSIGNED,1        ;Set if NOT using unsigned samples
  34.  
  35. ***************************************************************************************************
  36.         STRUCTURE    ScopeHeader,0            ;Channel header to aide in display
  37.          APTR    scph_oChannels;            ;Ptr to the seq of ScopeChan structs
  38.         ULONG    scph_oFreshness;        ;Freshness factor, 0=just updated
  39.         UWORD    scph_oNumChans;            ;Number of channels to display
  40.         UWORD    scph_oMaxVolume;        ;Max volume for this sound...
  41.         UWORD    scph_oMaxChans;            ;Number of chans this header points to
  42.         UBYTE    scph_oFlags;            ;See below for flags...
  43.         UBYTE    scph_oPad;            ;Pad-byte
  44.            STRUCT    scph_oReserved,4*4;        ;4 reserved longs
  45.         LABEL    scph_SIZEOF;
  46.                             ;Flags for scph_oFlags...
  47.         BITDEF    SCPH,7BITS,0            ;Set for 7 bit samples
  48.         BITDEF    SCPH,8BITS,1            ;Set for 8 bit samples
  49.         BITDEF    SCPH,16BITS,2            ;Set for 16 bit samples
  50.         BITDEF    SCPH,SIGNED,3            ;Set for signed samples
  51.         BITDEF    SCPH,UPDATED,5            ;This structure is being updated
  52.         BITDEF    SCPH,DISPLAYED,6        ;This structure is being displayed
  53.         BITDEF    SCPH,INVALID,7            ;Struct has been displayed and is now invalid
  54.  
  55. ***************************************************************************************************
  56.         STRUCTURE    ScopeChannel,0            ;Channel struct to use in display
  57.          APTR    scpc_oExtChan;            ;May point to a corresponding external channel structure
  58.         ULONG    scpc_oSampleLeft;        ;1/5:Bytes left of sample until loop
  59.          APTR    scpc_oSamplePos;        ;2/5:Current sample's position
  60.         ULONG    scpc_oLoopSize;            ;3/5:Size of loop
  61.          APTR    scpc_oSampleLoop;        ;4/5:Current sample's loop address
  62.         ULONG    scpc_oFreq;            ;5/5:Frequency (may be used by ext player)
  63.         UWORD    scpc_oVolume;            ;Current channel's volume
  64.         UBYTE    scpc_oFlags;            ;No flags defined yet!
  65.            STRUCT    scpc_oPad,5;            ;5 pad-bytes
  66.         LABEL    scpc_SIZEOF;
  67.  
  68. ***************************************************************************************************
  69.                             ;Macros...
  70. LOOP.L:        Macro                    ;32 bit loop down to ZERO
  71.         subq.l    #1,\1
  72.         bne    \2
  73.         Endm
  74.  
  75. NEXT.L:        Macro                    ;31 bit loop down to NEG
  76.         subq.l    #1,\1
  77.         bge    \2
  78.         Endm
  79.  
  80. LOOP:        Macro                    ;16 bit loop down to ZERO
  81.         subq.w    #1,\1
  82.         bne    \2
  83.         Endm
  84.  
  85. NEXT:        Macro                    ;15 bit loop down to NEG
  86.         subq.w    #1,\1
  87.         bge    \2
  88.         Endm
  89.  
  90. ;MOV = Move source to dest
  91. ;M1  = Subtract 1 from dest
  92. ;C   = Clear destination before moving a word to it
  93. ;A   = Address register version
  94. ;S   = Swap destination when done
  95.  
  96. MOVM1.L:    Macro
  97.         move.l    \1,\2
  98.         subq.l    #1,\2
  99.         Endm                    ;\2.l = (\1.l - 1)
  100. MOVM1:        Macro
  101.         move.w \1,\2
  102.         subq.w #1,\2
  103.         Endm                    ;\2.w = (\1.w - 1)
  104. MOVM1C:        Macro
  105.         moveq    #0,\2
  106.         move    \1,\2
  107.         sub    #1,\2
  108.         Endm                     ;\2.l = (\1.w - 1)
  109. MOVM1CA:    Macro
  110.         suba.l    \2,\2
  111.         move    \1,\2
  112.         sub    #1,\2
  113.         Endm                    ;\2.l = (\1.w - 1)
  114. MOVM1CS:    Macro
  115.         moveq    #0,\2
  116.         move    \1,\2
  117.         sub    #1,\2
  118.         swap    \2
  119.         Endm                    ;swap (\2.l=(\1.w-1))
  120. MOVC:        Macro
  121.         moveq    #0,\2
  122.         move    \1,\2
  123.         Endm                    ;\2.l = \1.w
  124. MOVCS:        Macro
  125.         moveq    #0,\2
  126.         move    \1,\2
  127.         swap    \2
  128.         Endm                    ;swap (\2.l = \1.w)
  129. MOVCA:        Macro
  130.         suba.l    \2,\2
  131.         move    \1,\2
  132.         Endm                    ;\2.l = \1.w
  133.  
  134.         ENDC    ;MONOSCOPE
  135.